Integrand size = 29, antiderivative size = 56 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {B x}{2}+\frac {(A+C) \sin (c+d x)}{d}+\frac {B \cos (c+d x) \sin (c+d x)}{2 d}-\frac {A \sin ^3(c+d x)}{3 d} \]
Time = 0.08 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.95 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 B c+6 B d x+3 (3 A+4 C) \sin (c+d x)+3 B \sin (2 (c+d x))+A \sin (3 (c+d x))}{12 d} \]
(6*B*c + 6*B*d*x + 3*(3*A + 4*C)*Sin[c + d*x] + 3*B*Sin[2*(c + d*x)] + A*S in[3*(c + d*x)])/(12*d)
Time = 0.43 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.04, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {3042, 4535, 3042, 3115, 24, 4532, 3042, 3492, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \int \cos ^3(c+d x) \left (C \sec ^2(c+d x)+A\right )dx+B \int \cos ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+B \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \int \frac {C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+B \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \int \frac {C \csc \left (c+d x+\frac {\pi }{2}\right )^2+A}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+B \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\) |
\(\Big \downarrow \) 4532 |
\(\displaystyle \int \cos (c+d x) \left (A \cos ^2(c+d x)+C\right )dx+B \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right ) \left (A \sin \left (c+d x+\frac {\pi }{2}\right )^2+C\right )dx+B \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\) |
\(\Big \downarrow \) 3492 |
\(\displaystyle B \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {\int \left (-A \sin ^2(c+d x)+A+C\right )d(-\sin (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle B \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {\frac {1}{3} A \sin ^3(c+d x)-(A+C) \sin (c+d x)}{d}\) |
B*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)) - (-((A + C)*Sin[c + d*x]) + ( A*Sin[c + d*x]^3)/3)/d
3.1.61.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[-f^(-1) Subst[Int[(1 - x^2)^((m - 1)/2)*(A + C - C*x^2 ), x], x, Cos[e + f*x]], x] /; FreeQ[{e, f, A, C}, x] && IGtQ[(m + 1)/2, 0]
Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Int[(C + A*Sin[e + f*x]^2)/Sin[e + f*x]^(m + 2), x] /; FreeQ[ {e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && ILtQ[(m + 1)/2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Time = 0.18 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.88
method | result | size |
parallelrisch | \(\frac {3 B \sin \left (2 d x +2 c \right )+A \sin \left (3 d x +3 c \right )+\left (9 A +12 C \right ) \sin \left (d x +c \right )+6 B x d}{12 d}\) | \(49\) |
derivativedivides | \(\frac {\frac {A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right )}{d}\) | \(57\) |
default | \(\frac {\frac {A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \sin \left (d x +c \right )}{d}\) | \(57\) |
risch | \(\frac {B x}{2}+\frac {3 A \sin \left (d x +c \right )}{4 d}+\frac {C \sin \left (d x +c \right )}{d}+\frac {A \sin \left (3 d x +3 c \right )}{12 d}+\frac {B \sin \left (2 d x +2 c \right )}{4 d}\) | \(59\) |
norman | \(\frac {B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (2 A -B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {B x}{2}-B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\frac {B x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}-\frac {\left (2 A -3 B -6 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}-\frac {\left (2 A +B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (2 A +3 B -6 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) | \(180\) |
Time = 0.27 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.80 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, B d x + {\left (2 \, A \cos \left (d x + c\right )^{2} + 3 \, B \cos \left (d x + c\right ) + 4 \, A + 6 \, C\right )} \sin \left (d x + c\right )}{6 \, d} \]
\[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.98 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B - 12 \, C \sin \left (d x + c\right )}{12 \, d} \]
-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*A - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*B - 12*C*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 138 vs. \(2 (50) = 100\).
Time = 0.30 (sec) , antiderivative size = 138, normalized size of antiderivative = 2.46 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (d x + c\right )} B + \frac {2 \, {\left (6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
1/6*(3*(d*x + c)*B + 2*(6*A*tan(1/2*d*x + 1/2*c)^5 - 3*B*tan(1/2*d*x + 1/2 *c)^5 + 6*C*tan(1/2*d*x + 1/2*c)^5 + 4*A*tan(1/2*d*x + 1/2*c)^3 + 12*C*tan (1/2*d*x + 1/2*c)^3 + 6*A*tan(1/2*d*x + 1/2*c) + 3*B*tan(1/2*d*x + 1/2*c) + 6*C*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 14.71 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.18 \[ \int \cos ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {B\,x}{2}+\frac {2\,A\,\sin \left (c+d\,x\right )}{3\,d}+\frac {C\,\sin \left (c+d\,x\right )}{d}+\frac {B\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {A\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \]